package com.yy.permissions_general.module.system.menu.mapper;

import com.yy.permissions_general.module.system.menu.entity.Auth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yy.permissions_general.module.system.menu.vo.MenuVo;
import com.yy.permissions_general.module.system.user.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限 Mapper 接口
 * </p>
 *
 * @author YY
 * @since 2021-08-07
 */
public interface AuthMapper extends BaseMapper<Auth> {

    /**
    * 分页查询
    * @param pageContext
    * @param auth
    * @return
    */
    Page<Auth> selectPage(@Param("page")Page pageContext, @Param("auth")Auth auth);

    /**
     * 根即当前用户获取菜单
     * @param user
     * @return
     */
    List<MenuVo> selectMenuVoByUser(@Param("user")User user);
}

